Skip to content

fix(config): restore anthropic-messages APIType enum#2968

Closed
1WorldCapture wants to merge 2 commits intowavetermdev:mainfrom
1WorldCapture:fix/restore-anthropic-apitype-enum
Closed

fix(config): restore anthropic-messages APIType enum#2968
1WorldCapture wants to merge 2 commits intowavetermdev:mainfrom
1WorldCapture:fix/restore-anthropic-apitype-enum

Conversation

@1WorldCapture
Copy link

Summary

This PR restores anthropic-messages in the ai:apitype JSON schema enum so Anthropic Claude modes can be configured via settings/UI again.

Background

In PR #2602 (Gemini backend addition), anthropic-messages was accidentally removed from the API type enum definitions.
Backend support for Anthropic messages remained intact in pkg/aiusechat/anthropic/, but configuration validation/schema no longer allowed selecting that API type.

Changes

  • Added anthropic-messages back to AIModeConfigType.APIType jsonschema enum in:
    • pkg/wconfig/settingsconfig.go
  • Added anthropic-messages back to generated schema enum in:
    • schema/waveai.json

Impact

  • Re-enables valid configuration of Anthropic Claude models through UI/settings.
  • No runtime behavior changes for already-supported backend execution paths.
  • Scope is limited to schema/config enum correction.

Testing

  • Manual validation by inspecting generated schema and config enum entries.
  • No new automated tests were added (schema enum restoration only).

The anthropic-messages API type was accidentally removed from the
jsonschema enum in PR #2602 when Google Gemini backend was added.
This restores it so users can configure Anthropic Claude models
through the UI.

Backend support for anthropic-messages was already complete in
pkg/aiusechat/anthropic/, only the schema enum was missing.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c8ebe49 and d4cec0c.

📒 Files selected for processing (1)
  • schema/waveai.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • schema/waveai.json

Walkthrough

This change adds "anthropic-messages" to the AIModeConfigType ai:apitype enum. The update is made in two files: pkg/wconfig/settingsconfig.go (jsonschema enum extension) and schema/waveai.json (schema enum entry). No control-flow, error-handling, or other behavioral logic was modified.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change—restoring the anthropic-messages APIType enum that was accidentally removed.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the context, changes, and impact of restoring the anthropic-messages enum.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Mar 3, 2026

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
frontend/app/view/waveai/waveai.tsx 213 WARNING: Switch case checks for "anthropic" but the new enum value is "anthropic-messages". This case will never match when using the new API type. Consider updating to case "anthropic-messages": or adding both cases if backward compatibility is needed.
schema/waveai.json 117 CRITICAL: Missing final newline violates .editorconfig (existing issue)
Files Reviewed (2 files)

Analysis

The PR correctly adds "anthropic-messages" to the API type enum in both the Go struct and the generated JSON schema. The backend already has full support for this API type via the APIType_AnthropicMessages constant and the anthropicBackend implementation.

However, there's a potential issue in the frontend code where waveai.tsx:213 checks for case "anthropic": instead of case "anthropic-messages":. This means the UI won't properly display the "Using Remote Anthropic API" indicator when this new API type is used.

Fix these issues in Kilo Cloud

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sawka
Copy link
Member

sawka commented Mar 3, 2026

Ah, unfortunately the anthropic messages API is not actually done (that's why it was removed). It is about 80% complete and hasn't been kept up-to-date. For now, if you want to use anthropic models you'll have to use an aggregator like openrouter.

@sawka sawka closed this Mar 3, 2026
@1WorldCapture
Copy link
Author

got it, thanks for your info. @sawka

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants